﻿<!DOCTYPE html>
<html>
<head>
    <title>中奖榜单</title>
    <meta name="viewport" content="width=device-width,initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <link href="css/weui.min.css" rel="stylesheet" type="text/css" />
    <link href="css/iconfont.css" rel="stylesheet" type="text/css" />

    <script src="js/jquery.min.js"></script>
    <script src="js/weui.min.js"></script>
    <script src="js/utils.js"></script>
    <script src="js/jweixin-1.3.2.js"></script>

    <style type="text/css">
        html,body{background:#f2f2f2;width:100%;height:100%;padding:0px;margin:0 auto;box-sizing: border-box;font-family: Verdana;font-size: 12px;}
        div,input{box-sizing: border-box;}
        .awardCard
        {
            width:100%;
            background: #fff;
            border-top-left-radius: 8px;
            border-top-right-radius: 8px;
            box-shadow: 0px 10px 40px #ccc;
            overflow: hidden;
            margin-bottom: 10px;
        }
        .awardCardName
        {
            font-size: 12px;
            text-overflow: ellipsis;
            white-space: nowrap;
            overflow:hidden;
        }
        .awardCardAward
        {
            font-size: 14px;
            color:#0099ee;
            text-overflow: ellipsis;
            white-space: nowrap;
            overflow:hidden;
        }
        .awardCardAddress
        {
            font-size: 12px;
            color: #999;
            text-overflow: ellipsis;
            white-space: nowrap;
            overflow: hidden;
        }
        .awardCardPic
        {
            width:100%;
            height:150px;
            background-position: center;
            background-size: cover;
        }
    </style>
    <script type="text/javascript">
        var _hmt = _hmt || [];
        (function() {
            var hm = document.createElement("script");
            hm.src = "//hm.baidu.com/hm.js?9e1a077ce4134c787bb4d3269e39ae53";
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(hm, s);
        })();

        $(document).ready(init);
        function updateLuckyManList(page=0){
            $.ajax({
                url:"https://jnsii.com/zj/api/getluckymanlist.php",
                type:"GET",
                dataType:"JSON",
                success:function(res){
                    if(res.err==0){
                        $("#list").html("");
                        var str="";
                        for(var i=0;i<res.result.length;i++){
                            str+="<div class='awardCard'>"+
                                    "<div class='awardCardPic' onclick='goLuckyDrawDetail(this)' luckydrawid='"+res.result[i].luckydrawid+"' style='background-image:url(http://file.jnsii.com/zj/upload/"+res.result[i].luckydrawInfo.awardimage+");'></div>"+
                                    "<div style='padding:5px;'>"+
                                        "<div class='awardCardAward'>奖品："+res.result[i].luckydrawInfo.awardname+"</div>"+
                                        "<div class='awardCardName'>中奖者："+res.result[i].ownernickname+"</div>"+
                                        "<div class'awardCardAddress'>收货地址："+res.result[i].expresscryptaddress+"</div>"+
                                        "<div style='text-align:center;padding:10px;display:"+(res.result[i].expressno==''?'none':'')+"'><span onclick='checkExpress(this)' expressno='"+res.result[i].expressno+"'  style='font-size:12px;padding:4px 10px;background:#0099ee;color:#fff;border-radius:10px;'>查看奖品递送物流信息</span></div>"+
                                    "</div>"+
                                "</div>";
                        }
                        $("#list").html(str);
                    }
                }
            });
        }
        function goLuckyDrawDetail(target){
            wx.miniProgram.navigateTo({url:'/pages/luckydraw/detail?id='+$(target).attr("luckydrawid")});
        }
        function checkExpress(target){
            var dom=$(target);
            window.open("https://jnsii.com/zj/h5/express/index.html?nu="+$(dom).attr("expressno"));
        }
        function init(){
            updateLuckyManList();
        }
        
    </script>
</head>
<body>
    <div style="padding:10px;font-size:12px;color:#ff0000;text-align: center;">所有数据真实，没有物流信息可能正在发货或用其他方式已领取</div>
    <div id='list' style="width:100%;height:100%;padding:10px;">
        
    </div>
</body>
</html>